import Vue from 'vue'
import Router from 'vue-router'
import ArticleCreate from './views/ArticleCreate.vue'
import ArticleList from './views/ArticleList.vue'
import EditArticle from './views/EditArticle.vue'


Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/articles/List',
      name: 'Article-List',
      component: ArticleList
    },
    {
      path: '/articles/create',
      name: 'Article-Create',
      component: ArticleCreate
    },
    {
      path: '/articles/:id/edit',
      name: 'Edit-Article',
      component: EditArticle
    },
    {
      path: '/',
      redirect: '/articles/List'
    }
  ]
})
